import AccessEnum from "@/access/accessEnum";

export const routes = [
  {
    path: "/",
    name: "首页",
    component: () => import("../views/HomePage.vue"),
    meta: {
      access: AccessEnum.NOT_LOGIN,
    },
  },
  {
    path: "/clock",
    name: "打卡",
    component: () => import("../views/workerViews/ClockPage.vue"),
    meta: {
      access: AccessEnum.WORKER,
    },
  },
  {
    path: "/vaction",
    name: "请假",
    component: () => import("../views/workerViews/VacationPahe.vue"),
    meta: {
      access: AccessEnum.WORKER,
    },
  },
  {
    path: "/resig",
    name: "辞职",
    component: () => import("../views/workerViews/ResignationPage.vue"),
    meta: {
      access: AccessEnum.WORKER,
    },
  },
  {
    path: "/schedule",
    name: "施工",
    component: () => import("../views/workerViews/SchedulePage.vue"),
    meta: {
      access: AccessEnum.WORKER,
    },
  },
  {
    path: "/brief",
    name: "公司简介",
    component: () => import("../views/custom/CompanyBrief.vue"),
    meta: {
      access: AccessEnum.USER,
    },
  },
  {
    path: "/reservation",
    name: "提交预约",
    component: () => import("../views/custom/SubmitReservation.vue"),
    meta: {
      access: AccessEnum.USER,
    },
  },
  {
    path: "/schedule1",
    name: "工程进度",
    component: () => import("../views/custom/EnjSchedule.vue"),
    meta: {
      access: AccessEnum.USER,
    },
  },
  {
    path: "/personal",
    name: "个人主页",
    component: () => import("../views/personalHomepage.vue"),
    meta: {
      hideInMenu: true,
    },
  },
  {
    path: "/mynotworker",
    name: "假条",
    component: () => import("../views/workerViews/MyNotWorker.vue"),
    meta: {
      hideInMenu: true,
    },
  },
  {
    path: "/myresignation",
    name: "辞条",
    component: () => import("../views/workerViews/MyResignation.vue"),
    meta: {
      hideInMenu: true,
    },
  },
  {
    path: "/page",
    name: "用户管理",
    component: () => import("../views/adminPage/UserPage.vue"),
    meta: {
      access: AccessEnum.ADMIN,
    },
  },
  {
    path: "/apppint",
    name: "预约信息管理",
    component: () => import("../views/adminPage/AppointmentsPage.vue"),
    meta: {
      access: AccessEnum.ADMIN,
    },
  },
  {
    path: "/budget",
    name: "预算资金详情",
    component: () => import("../views/adminPage/BudgetPage.vue"),
    meta: {
      access: AccessEnum.ADMIN,
    },
  },
  {
    path: "/punchln",
    name: "打卡信息管理",
    component: () => import("../views/adminPage/PunchlnPage.vue"),
    meta: {
      access: AccessEnum.ADMIN,
    },
  },
  {
    path: "/purchase",
    name: "采购信息管理",
    component: () => import("../views/adminPage/PurchasePage.vue"),
    meta: {
      access: AccessEnum.ADMIN,
    },
  },
  {
    path: "/notwork",
    name: "请假信息",
    component: () => import("../views/adminPage/NotWorkPage.vue"),
    meta: {
      access: AccessEnum.ADMIN,
    },
  },
  {
    path: "/resignation",
    name: "辞工信息管理",
    component: () => import("../views/adminPage/ResignationPage.vue"),
    meta: {
      access: AccessEnum.ADMIN,
    },
  },
  {
    path: "/woekplan",
    name: "提交工作计划",
    component: () => import("../views/adminPage/WorkPlayPage.vue"),
    meta: {
      access: AccessEnum.ADMIN,
    },
  },
  {
    path: "/construction",
    name: "施工进度管理",
    component: () => import("../views/adminPage/ConstructionPage.vue"),
    meta: {
      access: AccessEnum.ADMIN,
    },
  },
  {
    path: "/about",
    name: "联系我们",
    component: () => import("../views/AboutView.vue"),
    meta: {
      access: AccessEnum.NOT_LOGIN,
    },
  },
  {
    path: "/admin",
    name: "管理页面",
    component: () => import("../views/noAuth.vue"),
    meta: {
      access: AccessEnum.ADMIN,
      hideInMenu: true,
    },
  },
  {
    path: "/hide",
    name: "隐藏路由",
    component: () => import("../views/HomeView.vue"),
    meta: {
      hideInMenu: true,
    },
  },
  // {
  //   path: "/user",
  //   name: "用户",
  //   component: () => import("../layouts/UserLayout.vue"),
  //   children: [
  //     {
  //       path: "/user/login",
  //       name: "用户登录",
  //       component: import("../views/HomeView.vue"),
  //     },
  //     {
  //       path: "/user/register",
  //       name: "用户注册",
  //       component: import("../views/HomeView.vue"),
  //     },
  //   ],
  // },
  {
    path: "/user",
    name: "用户",
    component: () => import("../layouts/UserLayout.vue"),
    children: [
      {
        path: "/user/login",
        name: "用户登录",
        component: () => import("../views/UserLoginPage.vue"),
      },
      {
        path: "/user/register",
        name: "用户注册",
        component: () => import("../views/UserRegisterPage.vue"),
      },
    ],
    meta: {
      hideInMenu: true,
    },
  },
  {
    path: "/myappon",
    name: "我的预约",
    component: () => import("../views/custom/MyAppon.vue"),
    meta: {
      access: AccessEnum.USER,
      hideInMenu: true,
    },
  },
];
